<template>
  <view class="xd whe_maxv he_f"
        :class="
          activeIndex === 0?'ba_yx_1':
          activeIndex === 1?'ba_yx_2':
          activeIndex === 2?'ba_yx_3':
          activeIndex === 3?'ba_yx_4':
          activeIndex === 4?'ba_yx_5':''"
        style="height: 100vh">
    <view>
<!--      选择器-->
      <view class="boxs view_fu bor_10 wh_f mag_b_10" style="margin: 20px"
            :style="{ width: `${psfs.length * 60}px` }">
        <view class="xsgb wz_white nav" style=";color: white!important;">
          <view class="a" v-for="(item,index) in psfs" :key="index"
                @click.stop="moveSlider(index,item.id)"
                :class="{ active: index === activeIndex }">
            <text>{{ item.name }}</text>
          </view>
          <view class="animation start-zixun"
                :style="{ left: `${activeIndex * 60}px` }">
          </view>
        </view>
      </view>
<!--      等级信息-->
      <view class="img_bg wz_white" style="height:310rpx;">
        <view class="wh_f he_max xd">
          <view class="flex_1"></view>
          <view class="flex_1 czjz_flex">
            <view class="wh_9 mag_t-20" style="color: #d5f0dd">
<!--              <view class="fz_14">到期时间 {{ level_end_date }}</view>-->
              <view class="czjz_flex" style="height: 35px">
                <view>
                  <text class="fz_16 wz_white" style="">{{ parseInt(userInfo.level_arr[activeIndex].current_points) }}</text>
                  <text class="fz_12"> / {{ userInfo.level_arr[activeIndex].need_total_points }}</text>
                </view>
              </view>
              <view class="mag_t-5">
                <view class="ba_white bor_10 boxs" style="height: 10px;padding: 1px">
                  <view class="jdt_1" :class="
                              userInfo.level_arr[activeIndex].level===0?'jdt_1':
                              userInfo.level_arr[activeIndex+1].level===1?'jdt_1':
                              userInfo.level_arr[activeIndex+1].level===2?'jdt_2':
                              userInfo.level_arr[activeIndex+1].level===3?'jdt_3':
                              userInfo.level_arr[activeIndex+1].level===4?'jdt_4':
                              userInfo.level_arr[activeIndex+1].level===5?'jdt_5':''"
                        :style="{ height: '8px', width: getProgressBarWidth(userInfo.level_arr[activeIndex].current_points, userInfo.level_arr[activeIndex].need_total_points) }">
                  </view>
                </view>
              </view>
<!--              <view class="fz_10 mag_t-10">{{ userInfo.level_arr[activeIndex].is_achieve }}</view>-->
            </view>
          </view>
        </view>
        <image v-if="activeIndex === 0" src="https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752141628_eZdz89nKOL.png"></image>
        <image v-if="activeIndex === 1" src="https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752141786_yCHFq6aOi8.png"></image>
        <image v-if="activeIndex === 2" src="https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752141801_Mg3hVhoDL5.png"></image>
        <image v-if="activeIndex === 3" src="https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752141813_dTvrsm9RdG.png"></image>
        <image v-if="activeIndex === 4" src="https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752141826_PQPHJuP4ML.png"></image>
      </view>
    </view>

<!--    折扣-->
    <view class="flex_1 ba_white bor_10 boxs xd"
          style="padding: 30px 10px;">
        <view v-if="activeIndex === 0">
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/gfzk_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">充值好礼</view>
              <view class="fz_14 mag_t-5">
                累计充值5000可成为v1会员，激活送100元VIP会员金
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP生日尊享(即将上线)</view>
              <view class="fz_14 mag_t-5">

              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP月月返利</view>
              <view class="fz_14 mag_t-5">
                根据每月消费金额，消费月返券1%
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jflj_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">
                运费月月免
              </view>
              <view class="fz_14 mag_t-5">
                每月送运费抵扣券3张
                <view class="wz_rigdq">
                </view>
              </view>
            </view>
          </view>
          <view @click="getVip(1)" v-if="list[activeIndex+1].viplog === 1 && userInfo.current_level>0" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#3a9e5f;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">领取礼包</text>
            </view>
          </view>
          <view v-if="list[activeIndex+1].viplog === 0 && userInfo.current_level>0" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#c3c6c4;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">已领取</text>
            </view>
          </view>
        </view>
        <view v-if="activeIndex === 1">
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/gfzk_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">充值好礼</view>
              <view class="fz_14 mag_t-5">
                累计充值10000可成为v2会员，激活送150元VIP会员金
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP生日尊享(即将上线)</view>
              <view class="fz_14 mag_t-5">

              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP月月返利</view>
              <view class="fz_14 mag_t-5">
                根据每月消费金额，消费月返券1.5%
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jflj_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">
                运费月月免
              </view>
              <view class="fz_14 mag_t-5">
                每月送运费抵扣券4张
                <view class="wz_rigdq">
                </view>
              </view>
            </view>
          </view>
          <view @click="getVip(2)" v-if="list[activeIndex+1].viplog === 1 && userInfo.current_level>1" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#3a9e5f;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">领取礼包</text>
            </view>
          </view>
          <view v-if="list[activeIndex+1].viplog === 0 && userInfo.current_level>1" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#c3c6c4;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">已领取</text>
            </view>
          </view>
        </view>
        <view v-if="activeIndex === 2">
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/gfzk_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">充值好礼</view>
              <view class="fz_14 mag_t-5">
                累计充值20000可成为v3会员，激活送300元VIP会员金
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP生日尊享(即将上线)</view>
              <view class="fz_14 mag_t-5">

              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jpdh_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">VIP月月返利</view>
              <view class="fz_14 mag_t-5">
                根据每月消费金额，消费月返券2%
              </view>
            </view>
          </view>
          <view class="wh_f_r mag_b_20">
            <view>
              <img class="i_25" src="../img/jflj_1.png" alt="">
            </view>
            <view>
              <view class="fz_16 em">
                运费月月免
              </view>
              <view class="fz_14 mag_t-5">
                每月送运费抵扣券5张
                <view class="wz_rigdq">
                </view>
              </view>
            </view>
          </view>
          <view @click="getVip(3)" v-if="list[activeIndex+1].viplog === 1 && userInfo.current_level>2" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#3a9e5f;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">领取礼包</text>
            </view>
          </view>
          <view v-if="list[activeIndex+1].viplog === 0 && userInfo.current_level>2" class="wz_jz jd boxs" style="width: 100%;left: 0;bottom: 10px;padding: 0 20px">
            <view class="wz_white bor_5 fz_12" style="background-color:#c3c6c4;padding: 6px 20px">
              <img class="centerdq" src="../img/libao.png" style="width: 20px;height: 20px"/>
              <text class="centerdq mag_l-5">已领取</text>
            </view>
          </view>
        </view>
      <view>
        <!--        <view v-if="activeIndex === 1">-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/gfzk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">云享折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享2级可享-->
        <!--                <text class="yxwz_2">9.6折</text>-->
        <!--                ，可在农产品、吃喝玩乐购模块使用(限定秒杀模块不可使用)。-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jpdh_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">奖品兑换</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享2级可兑换云享2级礼包-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/mszk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">秒杀折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>0~100元 <text class="yxwz_2">(不含100)</text></view>-->
        <!--                  <view>享0折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>100~200元 <text class="yxwz_2">(不含200)</text></view>-->
        <!--                  <view>享2折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>200~300元 <text class="yxwz_2">(不含300)</text></view>-->
        <!--                  <view>享4折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>400~500元 <text class="yxwz_2">(不含500)</text></view>-->
        <!--                  <view>享8折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>当前折扣优惠只适用在限定秒杀模块</view>-->
        <!--                </view>-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jflj_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">积分积累</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                用户在云享商圈消费的金额可以折算成富治积分，等级越高折算的比例越高。-->
        <!--                云享2级                1元=1.1分-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--        </view>-->
        <!--        <view v-if="activeIndex === 2">-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/gfzk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">云享折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享3级可享-->
        <!--                <text class="yxwz_3">9.4折</text>-->
        <!--                ，可在农产品、吃喝玩乐购模块使用(限定秒杀模块不可使用)。-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jpdh_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">奖品兑换</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享3级可兑换云享3级礼包-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/mszk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">秒杀折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>0~100元 <text class="yxwz_3">(不含100)</text></view>-->
        <!--                  <view>享0折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>100~200元 <text class="yxwz_3">(不含200)</text></view>-->
        <!--                  <view>享2折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>200~300元 <text class="yxwz_3">(不含300)</text></view>-->
        <!--                  <view>享4折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>400~500元 <text class="yxwz_3">(不含500)</text></view>-->
        <!--                  <view>享8折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>当前折扣优惠只适用在限定秒杀模块</view>-->
        <!--                </view>-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jflj_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">积分积累</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                用户在云享商圈消费的金额可以折算成富治积分，等级越高折算的比例越高。-->
        <!--                云享3级                1元=1.15分-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--        </view>-->
        <!--        <view v-if="activeIndex === 3">-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/gfzk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">云享折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享4级可享-->
        <!--                <text class="wz_lv">9.2折</text>-->
        <!--                ，可在农产品、吃喝玩乐购模块使用(限定秒杀模块不可使用)。-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jpdh_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">奖品兑换</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享4级可兑换云享4级礼包-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/mszk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">秒杀折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>0~100元 <text class="yxwz_4">(不含100)</text></view>-->
        <!--                  <view>享0折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>100~200元 <text class="yxwz_4">(不含200)</text></view>-->
        <!--                  <view>享2折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>200~300元 <text class="yxwz_4">(不含300)</text></view>-->
        <!--                  <view>享4折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>400~500元 <text class="yxwz_4">(不含500)</text></view>-->
        <!--                  <view>享8折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>当前折扣优惠只适用在限定秒杀模块</view>-->
        <!--                </view>-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jflj_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">积分积累</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                用户在云享商圈消费的金额可以折算成富治积分，等级越高折算的比例越高。-->
        <!--                云享4级                1元=1.25分-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--        </view>-->
        <!--        <view v-if="activeIndex === 4">-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/gfzk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">云享折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享5级可享-->
        <!--                <text class="wz_lv">9.0折</text>-->
        <!--                ，可在农产品、吃喝玩乐购模块使用(限定秒杀模块不可使用)。-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jpdh_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">奖品兑换</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                云享1级可兑换云享1级礼包-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/mszk_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">秒杀折扣</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>0~100元 <text class="yxwz_5">(不含100)</text></view>-->
        <!--                  <view>享0折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>100~200元 <text class="yxwz_5">(不含200)</text></view>-->
        <!--                  <view>享2折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>200~300元 <text class="yxwz_5">(不含300)</text></view>-->
        <!--                  <view>享4折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>400~500元 <text class="yxwz_5">(不含500)</text></view>-->
        <!--                  <view>享8折</view>-->
        <!--                </view>-->
        <!--                <view class="wh_f_l mag_b_10">-->
        <!--                  <view>当前折扣优惠只适用在限定秒杀模块</view>-->
        <!--                </view>-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--          <view class="wh_f_r mag_b_20">-->
        <!--            <view>-->
        <!--              <img class="i_25" src="../img/jflj_1.png" alt="">-->
        <!--            </view>-->
        <!--            <view>-->
        <!--              <view class="fz_18 em">积分积累</view>-->
        <!--              <view class="fz_14 mag_t-5">-->
        <!--                用户在云享商圈消费的金额可以折算成富治积分，等级越高折算的比例越高。-->
        <!--                云享5级                1元=1.25分-->
        <!--              </view>-->
        <!--            </view>-->
        <!--          </view>-->
        <!--        </view>-->
      </view>
    </view>
  </view>
</template>
<script>
import {getVipLog, userCenter} from "../../Api/user";

export default {
  name: "index",
  data(){
    return{
      psfs_id:1,
      psfs: [
        {id: 1, title: "V1", name: "V1"},
        {id: 2, title: "V2", name: "V2"},
        {id: 3, title: "V3", name: "V3"},
      ],
      activeIndex:0,
      level_end_date:"",
      userInfo: {},
      list:[]
    }
  },
  methods:{
    getVip(e){
      getVipLog({
        level:e
      }).then(res => {
        if(res.success){
          uni.showToast({
            title: '领取成功!',
            icon: "none", // 图标类型，可选值：success, none
            duration: 2000 // 显示时间，单位毫秒
          });
          this.getList()
        }
      })
    },
    getProgressBarWidth(current_points, need_total_points) {
      if (current_points >= need_total_points) {
        return '100%';
      }
      const percentage = (current_points / need_total_points) * 100;
      return `${percentage}%`;
    },
    addPsfs(e){
      this.psfs_id = e
    },
    moveSlider(index,id){
      this.activeIndex = index;
      this.item = this.userInfo.level_arr[index+1]
      console.log()
    },
    getList(){
      userCenter().then(res=>{
        let info = res.data
        this.userInfo = res.data
        this.list = res.data.level_arr
      })
    }
  },
  onShow(){
    userCenter().then(res=>{
      let info = res.data
      if(res.data.current_level === 0){
        info.current_level = 1
        console.log("vip0")
      }
      this.userInfo = res.data
      this.list = res.data.level_arr
      this.moveSlider(res.data.current_level-1)

      console.log('用户信息',this.userInfo)
    })
  }
}
</script>
<style scoped lang="scss">
.jdt_1{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #7ECF98, #CBE1D1);
}
.jdt_2{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #7E9DCF, #CBD3E1);
}
.jdt_3{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #CFA87E, #E1D6CB);
}
.jdt_4{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #CF7E85, #E1CBCD);
}
.jdt_5{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #A47ECF, #D5CBE1);
}
.view_fu{
  background-color: #001800;
}
.nav{
  position: relative;
  height: 40px;
}
.nav{
  .a{
    /*padding: 5px 0;*/
    position: relative;
    display: block;
    float: left;
    line-height: 40px;
    height: 40px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    z-index: 10;
    user-select:none;
    width: 60px;
    font-weight: normal;
    font-size: 14px;
    color: white;
  }
}
.nav{
  .animation{
    position: absolute;
    height: 100%;
    width: 60px;
    background-color: #175a27;
    z-index: 9;
    border-radius: 10px;
    transition: all 0.3s;
  }
}
.yxwz_2{
  color:#2a5caa;
}
.yxwz_3{
  color:#ff9a2e;
}
.yxwz_4{
  color:#e63946;
}
.yxwz_5{
  color:#902eff;
}


.psfs_xz {
  background-color: #3a9e5f;
  color: white;
}

.psfs {
  color: #3a9e5f;
}
.mag_b_10_{
  margin-bottom: 10px;
}
.i_25{
  width: 25px;
  height: 25px;
  margin:0 10px;
}
.ba_yx_1{
  background-image: url("https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752138417_OuUy3TTXiS.png");
  background-size: 100% 100%;
}
.ba_yx_2{
  background-image: url("https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752138467_aPkZfu6RGf.png");
  background-size: 100% 100%;
}
.ba_yx_3{
  background-image: url("https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752138504_5IvGvUtEVp.png");
  background-size: 100% 100%;
}
.ba_yx_4{
  background-image: url("https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752138539_hOTjI8aXGa.png");
  background-size: 100% 100%;
}
.ba_yx_5{
  background-image: url("https://xdjzapi.towngo.cn/uploads/images/wx/202507/10/xcx_1752138558_W4N8lCuSip.png");
  background-size: 100% 100%;
}

.jdt_1{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #7ECF98, #CBE1D1);
}
.jdt_2{
   transition: all 0.3s;
   border-radius: 10px;
   background: linear-gradient(to bottom right, #7E9DCF, #CBD3E1);
 }
.jdt_3{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #CFA87E, #E1D6CB);
}
.jdt_4{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #CF7E85, #E1CBCD);
}
.jdt_5{
  transition: all 0.3s;
  border-radius: 10px;
  background: linear-gradient(to bottom right, #A47ECF, #D5CBE1);
}
</style>
